﻿<DebuggerDisplay("Shift to {TargetStateIndex} At {LookAhead.ToString()}")> _
Public Class LR1Shift
    Implements ILR1Action

    Private m_lookAhead As Terminal
    Public ReadOnly Property LookAhead() As Terminal
        Get
            Return m_lookAhead
        End Get
    End Property

    Private m_targetState As Integer
    Public ReadOnly Property TargetStateIndex() As Integer
        Get
            Return m_targetState
        End Get
    End Property

    Public Sub New(ByVal targetState As Integer, ByVal lookAhead As Terminal)
        Contract.ArgumentNotNull(lookAhead, "condition")

        m_lookAhead = lookAhead
        m_targetState = targetState
    End Sub

    Private ReadOnly Property ConditionSymbol() As ProductionSymbol Implements ILR1Action.ConditionSymbol
        Get
            Return m_lookAhead
        End Get
    End Property
End Class
